package com.gtt.pattern.behavior.template;

/**
 * AbstractClass
 *
 * @author 高甜甜(gao12581@sina.com)
 * @date 2011-4-2
 * 
 */
public abstract class AbstractClass {

	public void doAlgorithm(){
		
		System.out.println("Start do Algorithm");
		
		doStep1();
		System.out.println("after step 1");

		doStep2();
		System.out.println("after step 2");

		doStep3();
		System.out.println("after step 3");
		
		System.out.println("End Algorithm");
		
	}

	protected void doStep1() {
		System.out.println("do step 1");
	}

	protected void doStep2() {
		System.out.println("do step 2");
	}

	protected void doStep3() {
		System.out.println("do step 3");
	}
}
